#include <iostream>

/**
 * @brief 测试构造函数
 */
class TestCopy

{
public:
    TestCopy()
    {
    }

    TestCopy(const TestCopy& other)
    {
        std::cout << "Test copy copy" << std::endl;
    }

    TestCopy(TestCopy&& other) noexcept
    {
        std::cout << "Test copy move" << std::endl;
    }
};

auto func()
{
    TestCopy t{};
    return t; // 返回局部变量会调用移动构造
}

int main()
{
    func();
    return 0;
}
